import { Meteor } from 'meteor/meteor';

import { Images } from '/imports/api/images/images.js';
Meteor.methods({
  'images.upload'(file){
    let file_result = null;
    Images.insert(file, function (err, fileObj) {
      if (err){
         console.log(err);
      } else {
         // handle success depending what you need to do
        file_result = fileObj;
      }
    });
    return file_result;
  }
});
